<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文件</title>
<script language="javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript">
	var mall;
	var product;
	var user;
	$(function() {
		/*$.ajax({
			type: "GET",
			url: "server.php",
			data: {type: "getDateTime"},
			//async: false,
			success: function(out) {
						//alert(out);
					}
		});
		$.ajax({
			type: "GET",
			url: "server.php",
			data: {type: "getMallData"},
			//async: false,
			success: function(out) {
						mall = jQuery.parseJSON(out);
					}
		});*/
		/*$.ajax({
			type: "POST",
			url: "userInfo.php",
			data: {setUserExchangeInfo: 1, uid: "123abd", money: 200, angelCash:100},
			//async: false,
			success: function(out) {
						//mall = jQuery.parseJSON(out);
					}
		});*/
		/*$.ajax({
			type: "POST",
			url: "server.php",
			async: false,
			data: {type: "setUserInfo", uid: "12345abd", name: "cc", money: 150, angelCash:1100,
					energy:150, mood:151, health:152, elegant:154, energetic:155, romantic:156, virtuous:257,
					sexy:528, angelPoint:10000, itemList: "1;1;2;3;4;4;5;6;"},
			//async: false,
			success: function(out) {
						//mall = jQuery.parseJSON(out);
						alert(out);
					}
		});*/
		/*$.ajax({
			type: "GET",
			url: "server.php",
			data: {type: "getProductInfo"},
			//async: false,
			success: function(out) {
						product = jQuery.parseJSON(out);
					}
		});*/
		/*$.ajax({
			type: "POST",
			url: "server.php",
			data: "type=setUserInfo&uid=2E837207-82B7-5C89-A4B4-642EFA35C78A&name=\u5929\u4f7f\u5c0f\u6db5;Hannah&money=1291&angelCash=92&energy=100&mood=32&health=80&elegant=154&energetic=212&romantic=252&virtuous=29&sexy=196&angelPoint=8903&itemList=5;5;5;12;12;12;12;12;12;12;101;102;107;107;107;107;107;107;113;116;306;310;311;311;317;317;414;&evtCntList=(null)&runningSecs=0&foregroundSecs=0&angelBarClkCnt=0&maxAngelBarClkCnt=0&evtCancelCnt=0&rejectIgnoreInviteCnt=0&earnMoney=0&earnCash=0",
			//async: false,
			success: function(out) {
						//mall = jQuery.parseJSON(out);
					}
		});*/
		$.ajax({
			type: "GET",
			url: "server.php",
			data: {type: "getUserInfo"},
			//async: false,
			success: function(out) {
						user = jQuery.parseJSON(out);
						var html = "", tr1 = "", tr2 = "";
						for (var i = 0; i < user.length; i++) {
							tr1 = "<tr>";
							tr2 = "<tr>";
							for (var key in user[i]) {
								tr1 += "<td>" + key + "</td>";
								tr2 += "<td>" + user[i][key] + "</td>";
							}
							tr1 += "</tr>";
							tr2 += "</tr>";
							if (i > 0)
								tr1 = "";
							html += tr1 + tr2;
						}
						$("#tabUser").append(html);
						
					}
		});
		$.ajax({
			type: "GET",
			url: "server.php",
			data: {type: "getUserExchangeInfo"},
			//async: false,
			success: function(out) {
						user = jQuery.parseJSON(out);
						var html = "", tr1 = "", tr2 = "";
						for (var i = 0; i < user.length; i++) {
							tr1 = "<tr>";
							tr2 = "<tr>";
							for (var key in user[i]) {
								tr1 += "<td>" + key + "</td>";
								tr2 += "<td>" + user[i][key] + "</td>";
							}
							tr1 += "</tr>";
							tr2 += "</tr>";
							if (i > 0)
								tr1 = "";
							html += tr1 + tr2;
						}
						$("#tabUserEx").append(html);
						
					}
		});
		/*
		$.ajax({
			type: "POST",
			url: "userInfo.php",
			data: {type: "setUserInfo", uid:"ab123", money:500, angelCash:200},
			//async: false,
			success: function(out) {
						alert(out);
						//product = jQuery.parseJSON(out);
					}
		});*/
	});
</script>
</head>
<body>
	<table id="tabUser" cellpadding="1" cellspacing="1" align="center" border="1"></table>
	<table id="tabUserEx" cellpadding="1" cellspacing="1" align="center" border="1"></table>
</body>
</html>